package jdbc;

import jdbc.utill.DButil;

import java.sql.Connection;
import java.sql.PreparedStatement;

public class JdbcDemo10 {
    public static void main(String[] args) throws Exception {
        // 快捷键  alt+enter  快速定义调用方法返回值定义变量
        Connection connection = DButil.getConnection();
        String sql ="delete from t_user where id =? ";
        PreparedStatement ps = connection.prepareStatement(sql);
        ps.setInt(1, 4);
        ps.executeUpdate();
        DButil.close(connection);
        System.out.println("删除成功");


    }
}
